#ifndef __APP_H
#define __APP_H
#include "user_cfg.h"
#include "timeout.h"

#define SLEEP_TIMEOUT       20000

typedef enum {
    RUNNING_MODE = 0,
    STOP_MODE,
} work_mode_t;

typedef struct {
    uint8_t work_sta;
    uint8_t power_low_flag;
    uint8_t charge_flag;
    work_mode_t cur_mode;
    struct {
        timeout_para_t sleep_tout;
        timeout_para_t adc_power_tout;
        timeout_para_t power_low_ui_back_tout;
    } tout;
} app_para_t;
extern app_para_t app_para;

void App_Init(void);

void App_Handle(void);

#endif
